/*
 ------------------------------------------------------------------------------
	sdlmedia - a test program for a media search library, including test UI.

	Copyright (C) 2011 Pierre Veber
	
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 3 of the License, or
	(at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software Foundation,
	Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
------------------------------------------------------------------------------
*/

#pragma once

#include "SDL/SDL_thread.h"

struct Handle_t;
typedef int (*ThreadFunc)(Handle_t*, void *);

struct ThreadMessage_t
{
	int				iMsgCode;
	unsigned long	ulParam1;
	unsigned long	ulParam2;
};

Handle_t* CreateThread(ThreadFunc tf, void* pData);
void DeleteThread(Handle_t* pHandle);
int PostThreadMessage(Handle_t* pHandle, ThreadMessage_t* pMsg);
int GetMessage(Handle_t* pHandle, ThreadMessage_t* pMsg);

